<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        var arr1 = [1, 2, 3]
        var arr2 = [4, 5, 6]
        console.log([...arr1, ...arr2])


        var str = "page=1&pageSize=10";
        var arr = str.split("&")
        var allObj = {}
        arr.forEach(item=> {
            // console.log(item)
            var arr1 = item.split("=")
            // console.log(arr1)
            var obj = {}
            obj[arr1[0]] = arr1[1]
            // 这是ES6的语法，进行合并对象
            allObj = {...allObj, ...obj}
            // console.log(obj)
        })

        console.log(allObj)
    </script>
</body>
</html>